<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>微信支付</h1>

<div>
	<p><input type="button" value="点我生成付款码" id="payBtn"></p>	
	<p><div id="qrcode"></div></p>
	<p><div id="qrcode1"></div></p>
</div>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="#(contextPath)/assets/front/web/script/pay/jquery.qrcode.js"></script>
<script>
	$(document).ready(function(){
		
		
		$('#qrcode1').qrcode({
    		width: 120,
    		height: 120,
    		text: "https://mobile.baidu.com/item?docid=22737102&source=pc"
    	}); 
		
		
		$("#payBtn").click(function(){
			//$("#payQrCode").attr("src","#(contextPath)/pay")
			$.ajax({
	            type:"POST",
	            url:"#(contextPath)/pay/wxQrCode",
	            data:{name:"象漾充值测试信息",total_fee:1},
	            datatype: "JSON",
	            success:function(data){
	            	$('#qrcode').qrcode({
	            		width: 150,
	            		height: 150,
	            		text: data.msg
	            	});         
	            },
			});
		})
	})
</script>
</body>
</html>